using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ModelTools._Iterator
{
    /// <summary>
    /// <para>Iterate Feature Classes</para>
    /// <para>Iterates over feature classes in a workspace or feature dataset.</para>
    /// <para>迭代工作空间或要素数据集中的要素类。</para>
    /// </summary>    
    [DisplayName("Iterate Feature Classes")]
    public class IterateFeatureClasses : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public IterateFeatureClasses()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_workspace">
        /// <para>Workspace or Feature Dataset</para>
        /// <para>Workspace or feature dataset which stores the feature classes to iterate. If you define a geodatabase as your input workspace only the feature classes directly under the geodatabase will be iterated over (standalone feature classes). To iterate over all feature classes within a dataset located in the input geodatabase check the recursive option.</para>
        /// <para>工作空间或要素数据集，用于存储要迭代的要素类。如果将地理数据库定义为输入工作空间，则只会迭代地理数据库正下方的要素类（独立要素类）。要对位于输入地理数据库中的数据集中的所有要素类进行迭代，请选中递归选项。</para>
        /// </param>
        public IterateFeatureClasses(object _in_workspace)
        {
            this._in_workspace = _in_workspace;
        }
        public override string ToolboxName => "Model Tools";

        public override string ToolName => "Iterate Feature Classes";

        public override string CallName => "mb.IterateFeatureClasses";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_workspace, _wildcard, _feature_type.GetGPValue(), _recursive.GetGPValue(), _features, _name];

        /// <summary>
        /// <para>Workspace or Feature Dataset</para>
        /// <para>Workspace or feature dataset which stores the feature classes to iterate. If you define a geodatabase as your input workspace only the feature classes directly under the geodatabase will be iterated over (standalone feature classes). To iterate over all feature classes within a dataset located in the input geodatabase check the recursive option.</para>
        /// <para>工作空间或要素数据集，用于存储要迭代的要素类。如果将地理数据库定义为输入工作空间，则只会迭代地理数据库正下方的要素类（独立要素类）。要对位于输入地理数据库中的数据集中的所有要素类进行迭代，请选中递归选项。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Workspace or Feature Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_workspace { get; set; }


        /// <summary>
        /// <para>Wildcard</para>
        /// <para>A combination of * and characters that help to limit the results. The asterisk is the same as saying ALL. If no wildcard is specified, all inputs will be returned. For example, it can be used to restrict Iteration over input names starting with a certain character or word (for example, A* or Ari* or Land* and so on).</para>
        /// <para>* 和字符的组合，有助于限制结果。星号与说 ALL 相同。如果未指定通配符，则将返回所有输入。例如，它可用于限制对以特定字符或单词开头的输入名称（例如，A* 或 Ari* 或 Land* 等）的迭代。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Wildcard")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _wildcard { get; set; } = null;


        /// <summary>
        /// <para>Feature Type</para>
        /// <para><xdoc>
        ///   <para>The feature type to be used as a filter. Only features of the specified type will be output. Not specifying a feature type means that all features will be output.</para>
        ///   <bulletList>
        ///     <bullet_item>Annotation—Only annotation feature classes will be the output.</bullet_item><para/>
        ///     <bullet_item>Dimension—Only dimension feature classes will be the output.</bullet_item><para/>
        ///     <bullet_item>Edge—Only edge feature classes will be the output.</bullet_item><para/>
        ///     <bullet_item>Junction—Only junction feature classes will be the output.</bullet_item><para/>
        ///     <bullet_item>Line— Only line feature classes will be the output.</bullet_item><para/>
        ///     <bullet_item>Point—Only point feature classes will be the output.</bullet_item><para/>
        ///     <bullet_item>Polygon—Only polygon feature classes will be the output.</bullet_item><para/>
        ///     <bullet_item>Multipatch—Only multipatch feature classes will be the output.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要用作过滤器的要素类型。仅输出指定类型的要素。未指定要素类型意味着将输出所有要素。</para>
        ///   <bulletList>
        ///     <bullet_item>注记 - 仅将注记要素类作为输出。</bullet_item><para/>
        ///     <bullet_item>尺寸 - 仅尺寸要素类作为输出。</bullet_item><para/>
        ///     <bullet_item>边 - 只有边要素类作为输出。</bullet_item><para/>
        ///     <bullet_item>交汇点—仅交汇点要素类作为输出。</bullet_item><para/>
        ///     <bullet_item>线 - 只有线要素类将成为输出。</bullet_item><para/>
        ///     <bullet_item>点—仅点要素类作为输出。</bullet_item><para/>
        ///     <bullet_item>面—仅将面要素类作为输出。</bullet_item><para/>
        ///     <bullet_item>多面体—仅输出多面体要素类。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Feature Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _feature_type_value? _feature_type { get; set; } = null;

        public enum _feature_type_value
        {
            /// <summary>
            /// <para>Annotation</para>
            /// <para>Annotation—Only annotation feature classes will be the output.</para>
            /// <para>注记 - 仅将注记要素类作为输出。</para>
            /// </summary>
            [Description("Annotation")]
            [GPEnumValue("ANNOTATION")]
            _ANNOTATION,

            /// <summary>
            /// <para>Dimension</para>
            /// <para>Dimension—Only dimension feature classes will be the output.</para>
            /// <para>尺寸 - 仅尺寸要素类作为输出。</para>
            /// </summary>
            [Description("Dimension")]
            [GPEnumValue("DIMENSION")]
            _DIMENSION,

            /// <summary>
            /// <para>Edge</para>
            /// <para>Edge—Only edge feature classes will be the output.</para>
            /// <para>边 - 只有边要素类作为输出。</para>
            /// </summary>
            [Description("Edge")]
            [GPEnumValue("EDGE")]
            _EDGE,

            /// <summary>
            /// <para>Junction</para>
            /// <para>Junction—Only junction feature classes will be the output.</para>
            /// <para>交汇点—仅交汇点要素类作为输出。</para>
            /// </summary>
            [Description("Junction")]
            [GPEnumValue("JUNCTION")]
            _JUNCTION,

            /// <summary>
            /// <para>Line</para>
            /// <para>Line— Only line feature classes will be the output.</para>
            /// <para>线 - 只有线要素类将成为输出。</para>
            /// </summary>
            [Description("Line")]
            [GPEnumValue("LINE")]
            _LINE,

            /// <summary>
            /// <para>Point</para>
            /// <para>Point—Only point feature classes will be the output.</para>
            /// <para>点—仅点要素类作为输出。</para>
            /// </summary>
            [Description("Point")]
            [GPEnumValue("POINT")]
            _POINT,

            /// <summary>
            /// <para>Polygon</para>
            /// <para>Polygon—Only polygon feature classes will be the output.</para>
            /// <para>面—仅将面要素类作为输出。</para>
            /// </summary>
            [Description("Polygon")]
            [GPEnumValue("POLYGON")]
            _POLYGON,

            /// <summary>
            /// <para>Multipatch</para>
            /// <para>Multipatch—Only multipatch feature classes will be the output.</para>
            /// <para>多面体—仅输出多面体要素类。</para>
            /// </summary>
            [Description("Multipatch")]
            [GPEnumValue("MULTIPATCH")]
            _MULTIPATCH,

        }

        /// <summary>
        /// <para>Recursive</para>
        /// <para><xdoc>
        ///   <para>Determines if the iterator will iterate through all sub-folders in the main workspace.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Will iterate through all subfolders.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Will not iterate through all subfolders.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定迭代器是否将循环访问主工作区中的所有子文件夹。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 将循环访问所有子文件夹。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会循环访问所有子文件夹。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Recursive")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _recursive_value _recursive { get; set; } = _recursive_value._false;

        public enum _recursive_value
        {
            /// <summary>
            /// <para>RECURSIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RECURSIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NOT_RECURSIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NOT_RECURSIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _features { get; set; }


        /// <summary>
        /// <para>Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Name")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _name { get; set; }


        public IterateFeatureClasses SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}